package com.hysoft.cxf.ws.restful.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.hysoft.cxf.po.Cat;
import com.hysoft.cxf.service.UserService;
import com.hysoft.cxf.ws.restful.RestHelloWorld;
import com.hysoft.cxf.ws.utils.StringCat;

public class RestHelloWorldImpl implements RestHelloWorld {
	
	private UserService userService;
	
	public String say(String name) {
		return name + "   say:Hello World" + new Date();
	}

	@Override
	public List<Cat> getCatsByUser(String name) {
		return userService.getCatsByUser(name);
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	@Override
	public StringCat getAllCats3() {
		return userService.getStringCat();
	}

	@Override
	public Map<String, Cat> getAllCats1() {
		return userService.getAllCats();
	}

	@Override
	public Map<String, Cat> getAllCats2() {
		return userService.getAllCats();
	}
}
